﻿<UserControl x:Class="FIFP.Report.Report.LossByMonth"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
    xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
    mc:Ignorable="d"
             xmlns:vm="clr-namespace:FIFP.Report.ViewModel"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"   
    d:DesignHeight="300" d:DesignWidth="400">


    <telerikChart:RadChart x:Name="radChart" Style="{StaticResource ChartStyle}" TitleStyle="{StaticResource ChartTitleStyle}" LegendStyle="{StaticResource ChartLegendStyle}">
        <i:Interaction.Triggers>
            <i:EventTrigger  EventName="MouseLeftButtonDown">
                <i:InvokeCommandAction Command="{Binding RadChartMouseLeftButtonCommand}" 
        							CommandParameter="{Binding ElementName=radChart}"  />
            </i:EventTrigger>
            <i:EventTrigger  EventName="Loaded">
                <i:InvokeCommandAction Command="{Binding DivisionMonthLossRadChartLoadedCommand}"  
        							CommandParameter="{Binding ElementName=radChart}"  />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <telerikChart:RadChart.DefaultView>
                <telerikCharting:ChartDefaultView ChartLegendPosition="Top">

                    <telerikCharting:ChartDefaultView.ChartTitle>
                        <telerikCharting:ChartTitle Content="Monthly Losses" HorizontalAlignment="Stretch"/>
                    </telerikCharting:ChartDefaultView.ChartTitle>

                    <telerikCharting:ChartDefaultView.ChartLegend>
                        <telerikCharting:ChartLegend x:Name="chartLegend" Header=""/>
                    </telerikCharting:ChartDefaultView.ChartLegend>

                    <telerikCharting:ChartDefaultView.ChartArea>


                        <telerikCharting:ChartArea LegendName="chartLegend" PlotAreaStyle="{StaticResource ClipPanelStyle}" SmartLabelsEnabled="False">

                            <telerikCharting:ChartArea.AxisX>
                                <telerikCharting:AxisX Title="" IsDateTime="False" LayoutMode="Between">
                                    <telerikCharting:AxisX.AxisStyles>
                                        <telerikCharting:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}" TickLineStyle="{StaticResource AxisTickStyle}" GridLineStyle="{StaticResource GridLineStyle}" ItemLabelStyle="{StaticResource XItemLabelStyle}" TitleStyle="{StaticResource AxisTitleStyle}">
                                        </telerikCharting:AxisStyles>
                                    </telerikCharting:AxisX.AxisStyles>
                                </telerikCharting:AxisX>
                            </telerikCharting:ChartArea.AxisX>

                            <telerikCharting:ChartArea.AxisY>
                            <telerikCharting:AxisY Title="MBD" MinValue="0" MaxValue="{Binding DivisionMonthMaxValue}" Step="50" AutoRange="False" StripLinesVisibility="Collapsed" MajorGridLinesVisibility="Visible" MinorTicksVisibility="Collapsed" ExtendDirection="None">
                                    <telerikCharting:AxisY.AxisStyles>
                                        <telerikCharting:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}" TickLineStyle="{StaticResource AxisTickStyle}" GridLineStyle="{StaticResource GridLineStyle}" ItemLabelStyle="{StaticResource YItemLabelStyle}" TitleStyle="{StaticResource AxisTitleStyle}">
                                        </telerikCharting:AxisStyles>
                                    </telerikCharting:AxisY.AxisStyles>
                                </telerikCharting:AxisY>
                            </telerikCharting:ChartArea.AxisY>

                        <telerikCharting:ChartArea.AdditionalYAxes>
                            <telerik:AxisY Title="MBOD" AutoRange="False" MinValue="0" MaxValue="{Binding DivisionMonthY1MaxValue}" Step="10" StripLinesVisibility="Collapsed" MajorGridLinesVisibility="Visible" MinorTicksVisibility="Collapsed" ExtendDirection="None">
                                <telerikCharting:AxisY.AxisStyles>
                                    <telerikCharting:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}" TickLineStyle="{StaticResource AxisTickStyle}" GridLineStyle="{StaticResource GridLineStyle}" ItemLabelStyle="{StaticResource YItemLabelStyle}" TitleStyle="{StaticResource AxisTitleStyle}">
                                    </telerikCharting:AxisStyles>
                                </telerikCharting:AxisY.AxisStyles>
                            </telerik:AxisY>
                        </telerikCharting:ChartArea.AdditionalYAxes>

                    </telerikCharting:ChartArea>
                    </telerikCharting:ChartDefaultView.ChartArea>
                </telerikCharting:ChartDefaultView>
            </telerikChart:RadChart.DefaultView>
    </telerikChart:RadChart>
</UserControl>
